package com.example.young.peopleaccommodationms;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

public class HomePage extends AppCompatActivity implements View.OnClickListener{


    public Button register_btn;
    public Button show_btn;
    public Button statistic_btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_page);

        register_btn = (Button) findViewById(R.id.register_btn);
        show_btn = (Button) findViewById(R.id.show_btn);
        statistic_btn = (Button) findViewById(R.id.statistic_btn);

        register_btn.setOnClickListener(this);
        show_btn.setOnClickListener(this);
        statistic_btn.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.register_btn:
                Intent intent1 = new Intent(HomePage.this,Register.class);
                startActivity(intent1);
                break;
            case R.id.show_btn:
                Intent intent2 = new Intent(HomePage.this,ShowInfo.class);
                startActivity(intent2);
                break;
            case R.id.statistic_btn:
                Intent intent3 = new Intent(HomePage.this,StatictisFunds.class);
                startActivity(intent3);
                break;
        }
    }
}
